<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>信管帮</title>
    <link rel="stylesheet" href="./index.css">
    <script>
        document.documentElement.style.fontSize=document.documentElement.clientWidth/812 *20 + 'px'
    </script>
</head>
<body>
    <!-- header -->
    <header>
        <p>信管帮</p> 
        <!-- <div></div> -->
    </header>
    <!-- section -->
    <section>
        <div class="show">
            <!-- time -->
            <div class="time">
                <span class="time1"></span>
                <script>
                    setInterval(function(){
                        var time = new Date()
                        var year = time.getFullYear()
                        var month = time.getMonth()+1
                        if(month < 10) month = '0' + month
                        var day = time.getDate()
                        if(day < 10) day = '0' + day
                        var week = time.getDay()
                        switch(week){
                        case 0:  week = '日'
                        break
                        case 1:  week = '一'
                        break
                        case 2:  week = '二'
                        break
                        case 3:  week = '三'
                        break
                        case 4:  week = '四'
                        break
                        case 5:  week = '五'
                        break
                        case 6:  week = '六'
                        break
                        }
                        addtime1 = year+'年'+month+'月'+day+'日'+' 星期'+week
                        var time1 = document.getElementsByClassName('time1')[0]
                        time1.innerHTML = addtime1
                    }, 1000)
                    
                </script>
                <span class="time2"></span>
                <script>
                    setInterval(function(){
                        var time = new Date()
                        var hours = time.getHours()
                        if(hours < 10) hours = '0' + hours
                        var minutes = time.getMinutes()
                        if(minutes < 10) minutes = '0' + minutes
                        var seconds = time.getSeconds()
                        if(seconds < 10) seconds = '0' + seconds
                        addtime2 = hours+':'+minutes+':'+seconds  
                        var time2 = document.getElementsByClassName('time2')[0]
                        
                        time2.innerHTML = addtime2

                    }, 1000)

                    
                </script>
            </div>

            <!-- detailshow -->
            <div class="detailshow">
                <!-- now -->
                <div class="now nbox">
                    <p>正在进行</p>
                    <div class="nowin inbox">
                        <div class="left">
                            <p>NOW</p>
                            <div class="icon">
                                <div class="down"></div>
                                <div class="up"></div>
                            </div>
                        </div>
                        <div class="right">
                            <div class="lef">
                                <span class="course">加载中</span>
                                <span class="area"> </span>
                            </div>
                            <div class="rig">
                                <span class="teacher"> </span>
                                <span class="tim">
                                    <span class="tim1"> </span>
                                    <spam class="tim2"> </spam>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- next -->
                <div class="next nbox">
                    <p>下一节</p>
                    <div class="nextin inbox">
                        <div class="left">
                            <p style="color:#ff2b2b;">NEXT</p>
                            <div class="icon">
                                <div class="down" style="background:#ff2b2b70;"></div>
                                <div class="up" style="background:#FF2B2B;"></div>
                            </div>
                        </div>
                        <div class="right">
                            <div class="lef">
                                <span class="course" style="margin-top:10px; color:#5EA9FF; font-size:21px; font-weight:600;">待接入-course</span>
                                <span class="area" style="color:#FF2B2B; font-size:33px; font-weight:600; display:flex; align-items:center;"><div style="border:1px solid rgba(255, 0, 0, 0); width:20px;height:20px;background-image:url(./img/BAI-wuzi.png); background-size:contain;margin-right:4px; margin-top:10px"></div>5304</span>
                            </div>
                            <div class="rig">
                                <span class="teacher" style="color:#5EA9FF; display:flex; align-items:center;"><div style="width:16px;height:16px;background-image:url(./img/yonghu.png); background-size:contain;margin-right:7px;"></div>待接入</span>
                                <span class="tim" style="display:flex; align-items:end">
                                    <span class="tim1" style="font-size:12px; color:#5EA9FF; margin-right:5px; margin-bottom:3px;">START</span>
                                    <spam class="tim2" style="font-size:21px; color:#FF2B2B; font-weight:600;">08:10</spam>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- next盒子提醒效果 -->
                

            </div>
            
        </div>


<!-- 动态显示实时课表 -->
<script>
    setInterval(function(){
            // 获取时间
    var time = new Date()
    var year = time.getFullYear()
    var month = time.getMonth()+1
    if(month < 10) month = '0' + month
    var day = time.getDate()
    if(day < 10) day = '0' + day
    var week = time.getDay()
    switch(week){
    case 0:  week = '日'
    break
    case 1:  week = '一'
    break
    case 2:  week = '二'
    break
    case 3:  week = '三'
    break
    case 4:  week = '四'
    break
    case 5:  week = '五'
    break
    case 6:  week = '六'
    break
    }
    var hours = time.getHours()
    if(hours < 10) hours = '0' + hours
    var minutes = time.getMinutes()
    if(minutes < 10) minutes = '0' + minutes
    var seconds = time.getSeconds()
    if(seconds < 10) seconds = '0' + seconds
    var course = document.querySelector('.nowin .course')
    var teacher = document.querySelector('.nowin .teacher')
    var area = document.querySelector('.nowin .area')
    var tim1 = document.querySelector('.nowin .tim1')
    var tim2 = document.querySelector('.nowin .tim2')
    //匹配实时课表
    //筛选符合条件的年、月
    if((year == 2022 || 2023) && (month != 2 && month != 3)){
        // 周一
        if(week == '一'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='计算机网络B'
                teacher.innerHTML='李贵荣'
                area.innerHTML='6111'
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='ERP财务/数据库'
                teacher.innerHTML=' '
                area.innerHTML='Lab'
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周一）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
            //周二
        }else if(week == '二'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='管理沟通'
                teacher.innerHTML='肖俊涛'
                area.innerHTML='6413'
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='预测与决策分析模型'
                teacher.innerHTML='徐康'
                area.innerHTML='5302'
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='数据仓库与数据挖掘'
                teacher.innerHTML='杨丽华'
                area.innerHTML='6413'
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周二）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
            //周三
        }else if(week == '三'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='计算机网络B'
                teacher.innerHTML='李贵荣'
                area.innerHTML='6111'
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='运筹学'
                teacher.innerHTML='陈延寿'
                area.innerHTML='6217'
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周三）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
            //周四
        }else if(week == '四'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='预测与决策分析模型'
                teacher.innerHTML='徐康'
                area.innerHTML='5204'
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='数据仓库与数据挖掘'
                teacher.innerHTML='杨丽华'
                area.innerHTML='6413'
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='管理沟通'
                teacher.innerHTML='肖俊涛'
                area.innerHTML='6413'
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='ERP生产管理实务'
                teacher.innerHTML='王红英'
                area.innerHTML='Lab'
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='ERP生产管理实务'
                teacher.innerHTML='王红英'
                area.innerHTML='Lab'
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周四）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
            //周五
        }else if(week == '五'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='预测与决策分析模型'
                teacher.innerHTML='徐康'
                area.innerHTML='5204'
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='数据仓库与数据挖掘'
                teacher.innerHTML='杨丽华'
                area.innerHTML='6413'
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='ERP财务管理实务'
                teacher.innerHTML='刘崇欣'
                area.innerHTML='Lab'
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='ERP财务管理实务'
                teacher.innerHTML='刘崇欣'
                area.innerHTML='Lab'
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周五）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
            //周六
        }else if(week == '六'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='企业决策模拟'
                teacher.innerHTML='刘崇欣'
                area.innerHTML='Lab'
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='企业决策模拟'
                teacher.innerHTML='刘崇欣'
                area.innerHTML='Lab'
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='企业决策模拟'
                teacher.innerHTML='刘崇欣'
                area.innerHTML='Lab'
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='企业决策模拟'
                teacher.innerHTML='刘崇欣'
                area.innerHTML='Lab'
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='NULL'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周六）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
            //周日
        }else if(week == '日'){
            //1~2
            if((hours == 08 && (minutes >= 10 && minutes < 55)) || (hours == 09 && minutes < 45)){
                course.innerHTML='企模/数据库课设'
                teacher.innerHTML=''
                area.innerHTML='Lab'
                tim1.innerHTML='08:10~08:55'
                tim2.innerHTML='09:00~09:45'
            }else if((hours == 10 && (minutes >= 05 && minutes < 50)) || ((hours == 10 && (minutes >= 55 && minutes <= 59)) || (hours == 11 && minutes < 40))){
                //3~4
                course.innerHTML='企模/数据库课设'
                teacher.innerHTML=''
                area.innerHTML='Lab'
                tim1.innerHTML='10:05~10:~50'
                tim2.innerHTML='10:55~11:40'
            }else if((hours == 14 && minutes < 45) || ((hours == 14 && minutes >= 50 && minutes <= 59) || (hours == 15 && minutes < 35))){
                //5~6
                course.innerHTML='数据库技术A'
                teacher.innerHTML='李欣'
                area.innerHTML='6205'
                tim1.innerHTML='14:00~14:45'
                tim2.innerHTML='14:50~15:35'
            }else if(((hours == 15 && (minutes >= 55 && minutes <= 59)) || (hours == 16 && minutes < 40)) || ((hours == 16 && (minutes >= 45 && minutes <= 59)) || (hours == 17 && minutes < 30))){
                //7~8
                course.innerHTML='数据库技术A'
                teacher.innerHTML='李欣'
                area.innerHTML='6205'
                tim1.innerHTML='15:55~16:40'
                tim2.innerHTML='16:45~17:30'
            }else if((hours == 18 && minutes >= 15) || (hours == 19) || (hours == 20 && minutes < 40)){
                //9~11
                course.innerHTML='商务谈判'
                teacher.innerHTML='毛帅'
                area.innerHTML='6212'
                tim1.innerHTML='18:15~20:40'
                tim2.innerHTML='18:15~20:40'                
            }else{
                //非上课时间段
                course.innerHTML='休息状态（周日）'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML=' '    
            }
        }
    }else{
        course.innerHTML='超出服务时间范围'
                teacher.innerHTML=' '
                area.innerHTML=' '
                tim1.innerHTML=' '
                tim2.innerHTML='请升级'
    }


    }, 1000)
</script>







        <!-- <button class="btn" onclick="f1()">红</button> 
        <script>
            function f1() {
                var sec = document.getElementsByTagName('section')[0]
                var btn = document.querySelector('button')
                    if(btn.className == 'btn'){
                        sec.style.background='#000'
                        btn.className ='btn2'
                        btn.innerHTML = '黑'
                    }else{
                        sec.style.background='#fff'
                        btn.className ='btn'
                        btn.innerHTML = '红'
                    }
            }
        </script>-->


    </section>
    <!-- footer -->
    <footer>
        <ul>
            <li id="li1" onclick="location.href='./indexcourse.html'">首页</li>
            <li id="li2" onclick="location.href='./course.html'">课表</li>
            <li id="li3" onclick="location.href='./expansion.html'">拓展</li>
            <li id="li4" onclick="location.href='./about.html'">关于</li>
        </ul>
    </footer>
</body>

</html>
